package cn.wgx.modules.sys.entity;

import cn.wgx.modules.base.entity.BaseEntity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;

/**
 * Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
 * Description:
 * 菜单与用户关系表
 *
 * @author 
 */
public class SysMenuUser extends BaseEntity implements Serializable {
    /**
     *
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    private Integer menu_user_id;

    /**
     *
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    private Integer user_id;

    /**
     *
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    private Integer menu_id;

    /**
     *
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    private Date createDate;

    /**
     *
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    private Integer createUserId;

    /**
     *
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    private Date updateDate;

    /**
     *
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    private Integer updateUserId;

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    private static final long serialVersionUID = 1L;

    /**
     * This method returns the value of the database column education..sys_menu_user.menu_user_id
     *
     * @return the value of education..sys_menu_user.menu_user_id
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public Integer getMenu_user_id() {
        return menu_user_id;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public SysMenuUser withMenu_user_id(Integer menu_user_id) {
        this.setMenu_user_id(menu_user_id);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu_user.menu_user_id
     *
     * @param menu_user_id the value for education..sys_menu_user.menu_user_id
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public void setMenu_user_id(Integer menu_user_id) {
        this.menu_user_id = menu_user_id;
    }

    /**
     * This method returns the value of the database column education..sys_menu_user.user_id
     *
     * @return the value of education..sys_menu_user.user_id
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public Integer getUser_id() {
        return user_id;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public SysMenuUser withUser_id(Integer user_id) {
        this.setUser_id(user_id);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu_user.user_id
     *
     * @param user_id the value for education..sys_menu_user.user_id
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public void setUser_id(Integer user_id) {
        this.user_id = user_id;
    }

    /**
     * This method returns the value of the database column education..sys_menu_user.menu_id
     *
     * @return the value of education..sys_menu_user.menu_id
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public Integer getMenu_id() {
        return menu_id;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public SysMenuUser withMenu_id(Integer menu_id) {
        this.setMenu_id(menu_id);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu_user.menu_id
     *
     * @param menu_id the value for education..sys_menu_user.menu_id
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public void setMenu_id(Integer menu_id) {
        this.menu_id = menu_id;
    }

    /**
     * This method returns the value of the database column education..sys_menu_user.createDate
     *
     * @return the value of education..sys_menu_user.createDate
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public SysMenuUser withCreateDate(Date createDate) {
        this.setCreateDate(createDate);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu_user.createDate
     *
     * @param createDate the value for education..sys_menu_user.createDate
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * This method returns the value of the database column education..sys_menu_user.createUserId
     *
     * @return the value of education..sys_menu_user.createUserId
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public Integer getCreateUserId() {
        return createUserId;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public SysMenuUser withCreateUserId(Integer createUserId) {
        this.setCreateUserId(createUserId);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu_user.createUserId
     *
     * @param createUserId the value for education..sys_menu_user.createUserId
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * This method returns the value of the database column education..sys_menu_user.updateDate
     *
     * @return the value of education..sys_menu_user.updateDate
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public Date getUpdateDate() {
        return updateDate;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public SysMenuUser withUpdateDate(Date updateDate) {
        this.setUpdateDate(updateDate);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu_user.updateDate
     *
     * @param updateDate the value for education..sys_menu_user.updateDate
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    /**
     * This method returns the value of the database column education..sys_menu_user.updateUserId
     *
     * @return the value of education..sys_menu_user.updateUserId
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public Integer getUpdateUserId() {
        return updateUserId;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public SysMenuUser withUpdateUserId(Integer updateUserId) {
        this.setUpdateUserId(updateUserId);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_menu_user.updateUserId
     *
     * @param updateUserId the value for education..sys_menu_user.updateUserId
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public void setUpdateUserId(Integer updateUserId) {
        this.updateUserId = updateUserId;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", menu_user_id=").append(menu_user_id);
        sb.append(", user_id=").append(user_id);
        sb.append(", menu_id=").append(menu_id);
        sb.append(", createDate=").append(createDate);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", updateUserId=").append(updateUserId);
        sb.append("]");
        return sb.toString();
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysMenuUser other = (SysMenuUser) that;
        return (this.getMenu_user_id() == null ? other.getMenu_user_id() == null : this.getMenu_user_id().equals(other.getMenu_user_id()))
            && (this.getUser_id() == null ? other.getUser_id() == null : this.getUser_id().equals(other.getUser_id()))
            && (this.getMenu_id() == null ? other.getMenu_id() == null : this.getMenu_id().equals(other.getMenu_id()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId()));
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMenu_user_id() == null) ? 0 : getMenu_user_id().hashCode());
        result = prime * result + ((getUser_id() == null) ? 0 : getUser_id().hashCode());
        result = prime * result + ((getMenu_id() == null) ? 0 : getMenu_id().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode());
        return result;
    }

    /**
     *
     * @mbg.generated Tue Mar 31 14:48:49 CST 2020
     */
    public enum Column {
        menu_user_id("menu_user_id", "menu_user_id", "INTEGER", false),
        user_id("user_id", "user_id", "INTEGER", false),
        menu_id("menu_id", "menu_id", "INTEGER", false),
        createDate("createDate", "createDate", "TIMESTAMP", false),
        createUserId("createUserId", "createUserId", "INTEGER", false),
        updateDate("updateDate", "updateDate", "TIMESTAMP", false),
        updateUserId("updateUserId", "updateUserId", "INTEGER", false);

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        private static final String BEGINNING_DELIMITER = "\"";

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        private static final String ENDING_DELIMITER = "\"";

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        private final String column;

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        private final boolean isColumnNameDelimited;

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        private final String javaProperty;

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        private final String jdbcType;

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        public String value() {
            return this.column;
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        public String getValue() {
            return this.column;
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        public String getJavaProperty() {
            return this.javaProperty;
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        public String getJdbcType() {
            return this.jdbcType;
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        /**
         *
         * @mbg.generated Tue Mar 31 14:48:49 CST 2020
         */
        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }
    }
}